<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="jakarta.tags.core" %>
<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %>

<!-- 数据统计卡片 -->
<div class="dashboard-stats">
    <div class="stat-card">
        <div class="stat-icon">🥸</div>
        <div class="stat-info">
            <h3>用户总数</h3>
            <p class="stat-number">${stats.userCount}</p>
        </div>
    </div>
    <div class="stat-card">
        <div class="stat-icon">🕹️️</div>
        <div class="stat-info">
            <h3>情侣总数</h3>
            <p class="stat-number">${stats.coupleCount}</p>
        </div>
    </div>
    <div class="stat-card">
        <div class="stat-icon">🐳</div>
        <div class="stat-info">
            <h3>评论总数</h3>
            <p class="stat-number">${stats.commentCount}</p>
        </div>
    </div>
    <div class="stat-card">
        <div class="stat-icon">📝</div>
        <div class="stat-info">
            <h3>名言总数</h3>
            <p class="stat-number">${stats.quoteCount}</p>
        </div>
    </div>
</div>

<!-- 最近活动 -->
<div class="dashboard-activities">
    <!-- 最近创建的情侣 -->
    <div class="activity-section">
        <div class="section-header">
            <h3>🆕 最近创建的情侣</h3>
        </div>
        <div class="activity-list">
            <c:forEach items="${recentCouples}" var="couple">
                <div class="activity-item">
                    <div class="activity-icon">🖌️</div>
                    <div class="activity-content">
                        <div class="activity-header">
                            <span class="username">${couple.username}</span>
                            <span class="time">${couple.create_time}</span>
                        </div>
                        <div class="activity-body">
                            创建了新的情侣
                            <a href="/couples/${couple.id}" class="highlight">
                                ${couple.lover1_name} & ${couple.lover2_name}
                            </a>
                        </div>
                    </div>
                </div>
            </c:forEach>
        </div>
    </div>
    
    <!-- 最近评论 -->
    <div class="activity-section">
        <div class="section-header">
            <h3>🐳 最近评论</h3>
        </div>
        <div class="activity-list">
            <c:forEach items="${recentComments}" var="comment">
                <div class="activity-item">
                    <div class="activity-icon">🤔</div>
                    <div class="activity-content">
                        <div class="activity-header">
                            <span class="username">${comment.username}</span>
                            <span class="time">
                                <fmt:formatDate value="${comment.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
                            </span>
                        </div>
                        <div class="activity-body">
                            评论了 <a href="/couples/${comment.coupleId}" class="highlight">${comment.coupleName}</a>
                            <div class="comment-content">${comment.content}</div>
                        </div>
                    </div>
                </div>
            </c:forEach>
        </div>
    </div>
</div> 